<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>智能订餐</title>
    <meta name="description" content="">
    <meta name="HandheldFriendly" content="True">
    <meta name="MobileOptimized" content="320">
    <meta name="viewport" content="width=device-width, initial-scale=1, minimal-ui, user-scalable=no">
    <meta http-equiv="cleartype" content="on">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="/assets/base/Inforschool/css/style.css">
</head>
<body>
<div class="wraper">
    <div class="header font-white">
        <a href="javascript:history.go(-1)" class="iconfont icon-left font-white back"></a>
        <div class="font-16 text-center">智能订餐</div>
    </div>
    <div class="tab text-center font-gray1">
        <div class="tab-list extra">
            <p>校内实训</p>
        </div>
        <div class="tab-list">
            <p>校际接待</p>
        </div>
        <div class="tab-list">
            <p>校办接待</p>
        </div>
    </div>
    <div class="contain actived">

        <div class="js_title">
            <div class="padding-8-12">
                <span class="iconfont icon-dengdai font-gray1"></span>
                <span class="margin-l10 font-color">待审核</span>
            </div>
            <volist name="orderdata1" id="v">
                <div class="detail bg_white">
                    <a href="orderDetial?id={BEESCRM:$v['or_sn']}" class=" padding-6  font-gray1  actived border">
                        <div class="flex_between">
                            <div>
                                {BEESCRM:$v['dname']}
                            </div>
                            <div>
                                {BEESCRM:$v['create_time']}至{BEESCRM:$v['finish_time']}
                            </div>
                        </div>
                        <div>中餐/晚餐</div>
                        <div class="flex_between">
                            <div>总套餐份数</div>
                            <div>{BEESCRM:$v['num1']}份</div>
                        </div>
                    </a>
                    <div class=" padding-12 clearfix">
                        <div class="pull-right flex_between">
                            <a href="#" class="btn_complete ispass no_pass font-gray1 text-center font-12" data-type="3"
                               data-or_sn="{BEESCRM:$v['or_sn']}">不通过</a>
                            <a href="#" class="btn_complete ispass font-white text-center font-12" data-type="2"
                               data-or_sn="{BEESCRM:$v['or_sn']}">通过</a>
                        </div>
                    </div>
                </div>
            </volist>
            <p class="js_none text-center font-gray2 font-12 padding-8-12 hide">暂无订单</p>
        </div>


        <div class="js_title">
            <div class="padding-8-12">
                <span class="iconfont icon-wancheng font-gray1"></span>
                <span class="margin-l10 font-color">已审核</span>
            </div>
            <volist name="passorderdata1" id="v">
                <div class="detail bg_white">
                    <a href="orderDetial?id={BEESCRM:$v['or_sn']}" class="  font-gray1  actived">
                        <div class="boxs padding-6  font-gray1 border">
                            <div class="flex_between">
                                <div>
                                    {BEESCRM:$v['dname']}
                                </div>
                                <div>
                                    {BEESCRM:$v['create_time']}至{BEESCRM:$v['finish_time']}
                                </div>
                            </div>
                            <div>中餐/晚餐</div>
                            <div class="flex_between">
                                <div>总套餐份数</div>
                                <div>{BEESCRM:$v['num1']}份</div>
                            </div>
                        </div>
                        <div class="boxs padding-6 clearfix">
                            <div class="pull-right font-gray1 padding-12">
                                {BEESCRM:$v['pass1']}
                            </div>
                        </div>
                    </a>
                </div>
            </volist>
            <p class="js_none text-center font-gray2 font-12 padding-8-12 hide">暂无订单</p>
        </div>
    </div>

    <div class="contain">
        <div class="js_title">
            <div class="padding-8-12">
                <span class="iconfont icon-dengdai font-gray1"></span>
                <span class="margin-l10 font-color">待审核</span>
            </div>
            <volist name="orderdata2" id="v">
                <div class="detail bg_white">
                    <a href="orderDetial?id={BEESCRM:$v['or_sn']}" class="actived padding-6 border  font-gray1 ">
                        <div class="flex_between">
                            <div>
                                {BEESCRM:$v['dname']}
                            </div>
                            <div>
                                {BEESCRM:$v['create_time']}至{BEESCRM:$v['finish_time']}
                            </div>
                        </div>
                        <div>中餐/晚餐</div>
                        <div class="flex_between">
                            <div>总套餐份数</div>
                            <div>{BEESCRM:$v['num1']}份</div>
                        </div>
                    </a>
                    <div class=" padding-12 clearfix">
                        <div class="pull-right flex_between">
                            <a href="#" class="btn_complete ispass no_pass font-gray1 text-center font-12"
                               data-type="3"
                               data-or_sn="{BEESCRM:$v['or_sn']}">不通过</a>
                            <a href="#" class="btn_complete ispass font-white text-center font-12" data-type="2"
                               data-or_sn="{BEESCRM:$v['or_sn']}">通过</a>
                        </div>
                    </div>
                </div>
            </volist>
            <p class="js_none text-center font-gray2 font-12 padding-8-12 hide">暂无订单</p>
        </div>
        <div class="js_title">
            <div class="padding-8-12">
                <span class="iconfont icon-wancheng font-gray1"></span>
                <span class="margin-l10 font-color">已审核</span>
            </div>
            <volist name="passorderdata2" id="v">
                <div class="detail bg_white">
                    <a href="orderDetial?id={BEESCRM:$v['or_sn']}" class="  font-gray1  actived">
                        <div class="boxs padding-6  font-gray1 border">
                            <div class="flex_between">
                                <div>
                                    {BEESCRM:$v['dname']}
                                </div>
                                <div>
                                    {BEESCRM:$v['create_time']}至{BEESCRM:$v['finish_time']}
                                </div>
                            </div>
                            <div>中餐/晚餐</div>
                            <div class="flex_between">
                                <div>总套餐份数</div>
                                <div>{BEESCRM:$v['num1']}份</div>
                            </div>
                        </div>
                        <div class="boxs padding-6 clearfix">
                            <div class="pull-right font-gray1 padding-12">
                                {BEESCRM:$v['pass1']}
                            </div>
                        </div>
                    </a>
                </div>
            </volist>
            <p class="js_none text-center font-gray2 font-12 padding-8-12 hide">暂无订单</p>
        </div>
    </div>
    <div class="contain">
        <div class="js_title">
            <div class="padding-8-12">
                <span class="iconfont icon-dengdai font-gray1"></span>
                <span class="margin-l10">待审核</span>
            </div>
            <volist name="orderdata3" id="v">
                <div class="detail bg_white">
                    <a href="orderDetial?id={BEESCRM:$v['or_sn']}" class="actived border padding-6  font-gray1 ">
                        <div class="flex_between">
                            <div>
                                {BEESCRM:$v['dname']}
                            </div>
                            <div>
                                {BEESCRM:$v['create_time']}至{BEESCRM:$v['finish_time']}
                            </div>
                        </div>
                        <div>中餐/晚餐</div>
                        <div class="flex_between">
                            <div>总套餐份数</div>
                            <div>{BEESCRM:$v['num1']}份</div>
                        </div>
                    </a>
                    <div class=" padding-12 clearfix" id="pass">
                        <div class="pull-right flex_between">
                            <a href="#" class="btn_complete ispass no_pass font-gray1 text-center font-12"
                               data-type="3" data-or_sn="{BEESCRM:$v['or_sn']}">不通过</a>
                            <a href="#" class="btn_complete ispass font-white text-center font-12"
                               data-type="2"
                               data-or_sn="{BEESCRM:$v['or_sn']}">通过</a>
                        </div>
                    </div>
                </div>
            </volist>
            <p class="js_none text-center font-gray2 font-12 padding-8-12 hide">暂无订单</p>
        </div>
        <div class="js_title">
            <div class="padding-8-12">
                <span class="iconfont icon-wancheng font-gray1"></span>
                <span class="margin-l10">已审核</span>
            </div>
            <volist name="passorderdata3" id="v">
                <div class="detail bg_white">
                    <a href="orderDetial?id={BEESCRM:$v['or_sn']}" class="  font-gray1  actived">
                        <div class="boxs padding-6  font-gray1 border">
                            <div class="flex_between">
                                <div>
                                    {BEESCRM:$v['dname']}
                                </div>
                                <div>
                                    {BEESCRM:$v['create_time']}至{BEESCRM:$v['finish_time']}
                                </div>
                            </div>
                            <div>中餐/晚餐</div>
                            <div class="flex_between">
                                <div>总套餐份数</div>
                                <div>{BEESCRM:$v['num1']}份</div>
                            </div>
                        </div>
                        <div class="boxs padding-6 clearfix">
                            <div class="pull-right font-gray1 padding-12">
                                {BEESCRM:$v['pass1']}
                            </div>
                        </div>
                    </a>
                </div>
            </volist>
            <p class="js_none text-center font-gray2 font-12 padding-8-12 hide">暂无订单</p>
        </div>
    </div>


    <div class="pop-box height text-center hide">
        <div class="pop-hint font-gray1">
            <div class="top_green"></div>
            <div>
                <p class="pop_title ">提示</p>
                <p class="pop_txt js_poptxt"></p>
            </div>
            <input type="hidden" id="or_sn">
            <input type="hidden" id="type">
            <div class="flex_between pop_bottom">
                <a href="#" class="pop_btn width-50">取消</a>
                <a href="#" class="pop_btn width-50 active" id="check">确定</a>
            </div>
        </div>
    </div>
</div>


</body>
<script src="/assets/base/Inforschool/js/jquery-2.1.0.min.js"></script>
<script>
    $('.tab').on('click', '.tab-list', function () {
        var idx = $(this).index();
        $('.contain').eq(idx).addClass('actived').siblings('.contain').removeClass('actived');
        $(this).addClass('extra').siblings('.tab-list').removeClass('extra');
    });
    $('.btn_complete').click(function () {
        var or_sn = $(this).data('or_sn');
        var type = $(this).data('type');
        $("#or_sn").val(or_sn);
        $("#type").val(type);
        $('.pop-box').removeClass('hide');
        var txt = $.trim($(this).text());
        $('.js_poptxt').append('确认' + txt + '？');
    });
    $('.pop-box').on('click', '.pop_btn', function () {
        $('.pop-box').addClass('hide');
        $('.js_poptxt').empty();
    });
    $(document).on('click', '#check', function () {
        var data = {};
        var json = {};
        var or_sn = $("#or_sn").val().trim();
        var type = $("#type").val().trim();
        data.or_sn = or_sn;
        data.type = type;
        $.ajax({
            url: 'orderPass',
            type: 'post',
            data: data,
            dataType: 'json',
            success: function (result) {
                if (result.status == 'S') {
                    $('#pass').addClass('hide');
                    reload1();
                } else if (result.status == 'F') {
                    reload1();
                }
            }
        })

    })
    function reload1() {
        setTimeout('location.reload()', 3000);
    }

    $(function () {
        $('.js_title').each(function () {
            var leng=$(this).find('.detail').length;
            if (leng==0){
                $(this).find('.js_none').removeClass('hide');
            }
        })
    })
</script>
</html>